import 'package:bookshelf/generated/json/base/json_convert_content.dart';
import 'package:bookshelf/entity/setting_entity.dart';


SettingEntity $SettingEntityFromJson(Map<String, dynamic> json) {
	final SettingEntity settingEntity = SettingEntity();
	final String? apiAddr = jsonConvert.convert<String>(json['api_addr']);
	if (apiAddr != null) {
		settingEntity.apiAddr = apiAddr;
	}
	final String? psw = jsonConvert.convert<String>(json['psw']);
	if (psw != null) {
		settingEntity.psw = psw;
	}
	final String? auth = jsonConvert.convert<String>(json['auth']);
	if (auth != null) {
		settingEntity.auth = auth;
	}
	final String? hfBaudRate = jsonConvert.convert<String>(json['hfBaudRate']);
	if (hfBaudRate != null) {
		settingEntity.hfBaudRate = hfBaudRate;
	}
	final String? face = jsonConvert.convert<String>(json['face']);
	if (face != null) {
		settingEntity.face = face;
	}
	final String? kdAppId = jsonConvert.convert<String>(json['kdAppId']);
	if (kdAppId != null) {
		settingEntity.kdAppId = kdAppId;
	}
	final String? kdApi = jsonConvert.convert<String>(json['kdApi']);
	if (kdApi != null) {
		settingEntity.kdApi = kdApi;
	}
	final String? kdEpId = jsonConvert.convert<String>(json['kdEpId']);
	if (kdEpId != null) {
		settingEntity.kdEpId = kdEpId;
	}
	final String? kdAppSecret = jsonConvert.convert<String>(json['kdAppSecret']);
	if (kdAppSecret != null) {
		settingEntity.kdAppSecret = kdAppSecret;
	}
	final bool? log = jsonConvert.convert<bool>(json['log']);
	if (log != null) {
		settingEntity.log = log;
	}
	final String? deviceNo = jsonConvert.convert<String>(json['device_no']);
	if (deviceNo != null) {
		settingEntity.deviceNo = deviceNo;
	}
	final String? softNo = jsonConvert.convert<String>(json['softNo']);
	if (softNo != null) {
		settingEntity.softNo = softNo;
	}
	final String? deviceName = jsonConvert.convert<String>(json['deviceName']);
	if (deviceName != null) {
		settingEntity.deviceName = deviceName;
	}
	final String? websocketUrl = jsonConvert.convert<String>(json['websocketUrl']);
	if (websocketUrl != null) {
		settingEntity.websocketUrl = websocketUrl;
	}
	final String? roomName = jsonConvert.convert<String>(json['roomName']);
	if (roomName != null) {
		settingEntity.roomName = roomName;
	}
	final String? roomNo = jsonConvert.convert<String>(json['roomNo']);
	if (roomNo != null) {
		settingEntity.roomNo = roomNo;
	}
	final String? columnNo = jsonConvert.convert<String>(json['columnNo']);
	if (columnNo != null) {
		settingEntity.columnNo = columnNo;
	}
	final String? ledSerial = jsonConvert.convert<String>(json['ledSerial']);
	if (ledSerial != null) {
		settingEntity.ledSerial = ledSerial;
	}
	final String? idSerial = jsonConvert.convert<String>(json['idSerial']);
	if (idSerial != null) {
		settingEntity.idSerial = idSerial;
	}
	final String? hfSerial = jsonConvert.convert<String>(json['hfSerial']);
	if (hfSerial != null) {
		settingEntity.hfSerial = hfSerial;
	}
	final String? analysisBook = jsonConvert.convert<String>(json['analysisBook']);
	if (analysisBook != null) {
		settingEntity.analysisBook = analysisBook;
	}
	final String? analysisReader = jsonConvert.convert<String>(json['analysisReader']);
	if (analysisReader != null) {
		settingEntity.analysisReader = analysisReader;
	}
	final String? ledRule = jsonConvert.convert<String>(json['ledRule']);
	if (ledRule != null) {
		settingEntity.ledRule = ledRule;
	}
	final String? norms = jsonConvert.convert<String>(json['norms']);
	if (norms != null) {
		settingEntity.norms = norms;
	}
	final int? rotate = jsonConvert.convert<int>(json['rotate']);
	if (rotate != null) {
		settingEntity.rotate = rotate;
	}
	final int? sleepTime = jsonConvert.convert<int>(json['sleepTime']);
	if (sleepTime != null) {
		settingEntity.sleepTime = sleepTime;
	}
	final int? actionTime = jsonConvert.convert<int>(json['actionTime']);
	if (actionTime != null) {
		settingEntity.actionTime = actionTime;
	}
	final int? inventoryTime = jsonConvert.convert<int>(json['inventoryTime']);
	if (inventoryTime != null) {
		settingEntity.inventoryTime = inventoryTime;
	}
	final bool? twoSided = jsonConvert.convert<bool>(json['twoSided']);
	if (twoSided != null) {
		settingEntity.twoSided = twoSided;
	}
	final bool? main = jsonConvert.convert<bool>(json['main']);
	if (main != null) {
		settingEntity.main = main;
	}
	final bool? exchange = jsonConvert.convert<bool>(json['exchange']);
	if (exchange != null) {
		settingEntity.exchange = exchange;
	}
	final bool? action = jsonConvert.convert<bool>(json['action']);
	if (action != null) {
		settingEntity.action = action;
	}
	final List<SettingEntityPlace>? place = jsonConvert.convertListNotNull<SettingEntityPlace>(json['place']);
	if (place != null) {
		settingEntity.place = place;
	}
	final List<SettingEntityReader>? reader = jsonConvert.convertListNotNull<SettingEntityReader>(json['reader']);
	if (reader != null) {
		settingEntity.reader = reader;
	}
	return settingEntity;
}

Map<String, dynamic> $SettingEntityToJson(SettingEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['api_addr'] = entity.apiAddr;
	data['log'] = entity.log;
	data['psw'] = entity.psw;
	data['auth'] = entity.auth;
	data['device_no'] = entity.deviceNo;
	data['hfBaudRate'] = entity.hfBaudRate;
	data['softNo'] = entity.softNo;
	data['deviceName'] = entity.deviceName;
	data['websocketUrl'] = entity.websocketUrl;
	data['roomName'] = entity.roomName;
	data['roomNo'] = entity.roomNo;
	data['columnNo'] = entity.columnNo;
	data['kdApi'] = entity.kdApi;
	data['ledSerial'] = entity.ledSerial;
	data['idSerial'] = entity.idSerial;
	data['hfSerial'] = entity.hfSerial;
	data['analysisBook'] = entity.analysisBook;
	data['analysisReader'] = entity.analysisReader;
	data['ledRule'] = entity.ledRule;
	data['norms'] = entity.norms;
	data['rotate'] = entity.rotate;
	data['kdEpId'] = entity.kdEpId;
	data['sleepTime'] = entity.sleepTime;
	data['actionTime'] = entity.actionTime;
	data['inventoryTime'] = entity.inventoryTime;
	data['twoSided'] = entity.twoSided;
	data['kdAppSecret'] = entity.kdAppSecret;
	data['kdAppId'] = entity.kdAppId;
	data['main'] = entity.main;
	data['exchange'] = entity.exchange;
	data['action'] = entity.action;
	data['place'] =  entity.place?.map((v) => v.toJson()).toList();
	data['reader'] =  entity.reader?.map((v) => v.toJson()).toList();
	return data;
}

SettingEntityReader $SettingEntityReaderFromJson(Map<String, dynamic> json) {
	final SettingEntityReader settingEntityReader = SettingEntityReader();
	final int? station = jsonConvert.convert<int>(json['station']);
	if (station != null) {
		settingEntityReader.station = station;
	}
	final int? knot = jsonConvert.convert<int>(json['knot']);
	if (knot != null) {
		settingEntityReader.knot = knot;
	}
	final int? state = jsonConvert.convert<int>(json['state']);
	if (state != null) {
		settingEntityReader.state = state;
	}
	return settingEntityReader;
}

Map<String, dynamic> $SettingEntityReaderToJson(SettingEntityReader entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['station'] = entity.station;
	data['knot'] = entity.knot;
	data['state'] = entity.state;
	return data;
}

SettingEntityPlace $SettingEntityPlaceFromJson(Map<String, dynamic> json) {
	final SettingEntityPlace settingEntityPlace = SettingEntityPlace();
	final String? place = jsonConvert.convert<String>(json['place']);
	if (place != null) {
		settingEntityPlace.place = place;
	}
	final String? placeName = jsonConvert.convert<String>(json['placeName']);
	if (placeName != null) {
		settingEntityPlace.placeName = placeName;
	}
	final int? station = jsonConvert.convert<int>(json['station']);
	if (station != null) {
		settingEntityPlace.station = station;
	}
	final String? ant = jsonConvert.convert<String>(json['ant']);
	if (ant != null) {
		settingEntityPlace.ant = ant;
	}
	final String? led = jsonConvert.convert<String>(json['led']);
	if (led != null) {
		settingEntityPlace.led = led;
	}
	final String? broad = jsonConvert.convert<String>(json['broad']);
	if (broad != null) {
		settingEntityPlace.broad = broad;
	}
	final int? state = jsonConvert.convert<int>(json['state']);
	if (state != null) {
		settingEntityPlace.state = state;
	}
	return settingEntityPlace;
}

Map<String, dynamic> $SettingEntityPlaceToJson(SettingEntityPlace entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['place'] = entity.place;
	data['placeName'] = entity.placeName;
	data['station'] = entity.station;
	data['ant'] = entity.ant;
	data['led'] = entity.led;
	data['broad'] = entity.broad;
	data['state'] = entity.state;
	return data;
}